﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using System.Threading;

namespace OBNEPGGrabber
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main()
        {
            
            ServiceBase[] ServicesToRun;
            ServicesToRun = new ServiceBase[] 
			{ 
				new OBNEPGGrabberSvc() 
			};
            ServiceBase.Run(ServicesToRun);
            
            
            /* Use the next piece of code while debugging...
             * it's easier than attaching the debugger to the service.
            OBNEPGGrabberSvc svc = new OBNEPGGrabberSvc(); 
            Thread thrdFetcher = new Thread(new ThreadStart(svc.FetchData));
            thrdFetcher.Start();
            while (true)
            {
                Thread.Sleep(10000);
            }
            */
        }
    }
}
